<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Discount_type')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="discountTypeList" item="vo"}
            <label for="row[discount_type]-{$key}"><input id="row[discount_type]-{$key}" class="discount_type" name="row[discount_type]" type="radio" value="{$key}" {in name="key" value="$row.discount_type"}checked{/in} /> {$vo}</label>
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Goods_type')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="goodsTypeList" item="vo"}
            <label for="row[goods_type]-{$key}"><input id="row[goods_type]-{$key}" class="goods_type" name="row[goods_type]" type="radio" value="{$key}" {in name="key" value="$row.goods_type"}checked{/in} /> {$vo}</label>
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group goods_ids">
        <label class="control-label col-xs-12 col-sm-2">{:__('Goods_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-goods_ids" data-source="goods/goods/index" data-multiple="true" data-field="goods_name" class="form-control selectpage" name="row[goods_ids]" type="text" value="{$row.goods_ids|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <div class="input-group">-->
<!--                <input id="c-image" class="form-control" size="50" name="row[image]" type="text" value="{$row.image|htmlentities}">-->
<!--                <div class="input-group-addon no-border no-padding">-->
<!--                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>-->
<!--                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>-->
<!--                </div>-->
<!--                <span class="msg-box n-right" for="c-image"></span>-->
<!--            </div>-->
<!--            <ul class="row list-inline faupload-preview" id="p-image"></ul>-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Target')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-target" min="0" data-rule="required" class="form-control" name="row[target]" type="number" value="{$row.target|htmlentities}">
        </div>
    </div>
    <div class="form-group price">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" min="0.01" class="form-control" step="0.01" name="row[price]" type="number" value="{$row.price|htmlentities}">
        </div>
    </div>
    <div class="form-group discount">
        <label class="control-label col-xs-12 col-sm-2">{:__('Discount')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-discount" min="1" max="10" class="form-control" step="0.1" name="row[discount]" type="number" value="{$row.discount|htmlentities}">
            <p style="color: darkred">注: 参数为 1~10,为1折到10折; 折扣价格计算方法为[ 原价 * ( 折扣 / 10 ) ]</p>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Sent_num')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sent_num" min="1" max="5000" data-rule="required" class="form-control" name="row[sent_num]" type="number" value="{$row.sent_num|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Sent_type')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="sentTypeList" item="vo"}
            <label for="row[sent_type]-{$key}"><input id="row[sent_type]-{$key}" class="sent_type" name="row[sent_type]" type="radio" value="{$key}" {in name="key" value="$row.sent_type"}checked{/in} /> {$vo}</label>
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group sent_user_ids">
        <label class="control-label col-xs-12 col-sm-2">{:__('Sent_user_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sent_user_ids" data-source="user/user/index" data-multiple="true" data-field="nickname" class="form-control selectpage" name="row[sent_user_ids]" type="text" value="{$row.sent_user_ids|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Use_type')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="checkbox">
            {foreach name="useTypeList" item="vo"}
            <label for="row[use_type][]-{$key}"><input id="row[use_type][]-{$key}" name="row[use_type][]" type="checkbox" value="{$key}" {in name="key" value="$row.use_type"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Draw_num')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-draw_num" class="form-control" name="row[draw_num]" type="number" value="{$row.draw_num|htmlentities}">-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('使用时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-time" data-rule="required" class="form-control datetimerange" name="row[time]" type="text" value="{:$row.starttime?datetime($row.starttime):''} - {:$row.endtime?datetime($row.endtime):''}">
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Starttime')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-starttime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[starttime]" type="text" value="{:$row.starttime?datetime($row.starttime):''}">-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Endtime')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-endtime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[endtime]" type="text" value="{:$row.endtime?datetime($row.endtime):''}">-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
